const uniteUnique = (arr1, arr2, ...arrs) => {
  const result = [];
  for (const arr of [arr1, arr2, ...arrs]) {
    for (const num of arr) {
      if (!result.includes(num)) result.push(num);
    }
  }
  return result;
}

let output = uniteUnique([1, 3, 2], [5, 2, 1, 4], [2, 1]);
output = uniteUnique([1, 3, 2, 3], [5, 2, 1, 4], [2, 1]);
console.log(output);